<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>creat</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_002_038">&nbsp;</a>NAME</h4><blockquote>
creat - create a new file or rewrite an existing one
</blockquote><h4><a name = "tag_000_002_039">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;<a href="systypes.h.html">sys/types.h</a>&gt;
#include &lt;<a href="sysstat.h.html">sys/stat.h</a>&gt;
#include &lt;<a href="fcntl.h.html">fcntl.h</a>&gt;

int creat(const char *<i>path</i>, mode_t <i>mode</i>);
</code>
</pre>
</blockquote><h4><a name = "tag_000_002_040">&nbsp;</a>DESCRIPTION</h4><blockquote>
The function call:
<pre>
<code>
creat(path, mode)
</code>
</pre>
is equivalent to:
<pre>
<code>
open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)
</code>
</pre>
</blockquote><h4><a name = "tag_000_002_041">&nbsp;</a>RETURN VALUE</h4><blockquote>
Refer to
<i><a href="open.html">open()</a></i>.
</blockquote><h4><a name = "tag_000_002_042">&nbsp;</a>ERRORS</h4><blockquote>
Refer to
<i><a href="open.html">open()</a></i>.
</blockquote><h4><a name = "tag_000_002_043">&nbsp;</a>EXAMPLES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_002_044">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_002_045">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_002_046">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="open.html">open()</a></i>,
<i><a href="fcntl.h.html">&lt;fcntl.h&gt;</a></i>,
<i><a href="sysstat.h.html">&lt;sys/stat.h&gt;</a></i>,
<i><a href="systypes.h.html">&lt;sys/types.h&gt;</a></i>.
</blockquote><h4>DERIVATION</h4><blockquote>
Derived from Issue 1 of the SVID.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>

